home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / tex / man / dvidvi.doc < prev    next >
Text File  |  1993-07-28  |  9KB  |  222 lines

  1. DviDvi 1.0     Documentation
  2. ****************************
  3.  
  4.    DviDvi converts a DVI-file into another DVI-file. This is version
  5. 1.0, author Thomas Rockicki, Amiga-Port (better: PasTeX-Port) Jochen
  6. Wiedmann.  Copyright (C) 1988-91, Radical Eye Software
  7.  
  8.    Here's a little hack I threw together for those doing pagination
  9. tricks.  The dvidvi program converts a DVI file into another DVI file,
  10. with perhaps certain changes.
  11.  
  12.    Enjoy; this is an early release, so make suggestions, improvements,
  13. and I'll get back to you with a better version later.
  14.  
  15. Invocation: Parameters, options and arguments
  16. *********************************************
  17.  
  18.    Invocation is
  19.  
  20.                     dvidvi param infile outfile
  21.  
  22.    What are the parameters?  The 'easy' parameters are the following:
  23.  
  24. -f n
  25.      page n is first page selected
  26.  
  27. -l n
  28.      page n is last page selected
  29.  
  30. -n n
  31.      select at most n pages. Notice that n is the number of pages
  32.      selected, independently of the number of pages actually contained
  33.      in a sheet
  34.  
  35. -i { n1..n2 | n1 }[,...]
  36.      include pages (ranges allowed). When this option is used, ONLY the
  37.      specified pages are selected. However, we can exclude from these
  38.      pages with the option -x
  39.  
  40. -x { n1..n2 | n1 }[,...]
  41.      exclude pages (ranges allowed)
  42.  
  43. -q
  44.      work in quiet mode, that is do not print in the screen messages of
  45.      how the work is being done.
  46.  
  47. -r
  48.      reverse the order of the pages.
  49.  
  50. -sm m
  51.      Scale the magnification. (Magnification is multiplied by
  52.      magstep(m)).
  53.  
  54. -sh m
  55.      Scale the document-height. (Height is multiplied by magstep(m)).
  56.  
  57. -sw m
  58.      Scale the document-width. (Width is multiplied by magstep(m)).
  59.  
  60.    The page numbers for the above options -f-l-i and -x can
  61. be specified in different ways.
  62.  
  63.   1. If a number n is given, it is interpreted as the n'th page from the
  64.      begining of the .dvi file. Of course, this number is independent
  65.      of the page number assigned by TeX.
  66.  
  67.   2. TeX page numbers are those who are actually written in the page;
  68.      these page numbers can be modified, for example, by using the TeX
  69.      commands \pagenumbering\setcounter{page}{n}, and
  70.      \addtocounter{page}{n}.  A TeX page number can be specified
  71.      by preceding the number n with the character @. Thus, if you
  72.      specify -f @25 -l @30 you select the pages between 25 and 30,
  73.      these numbers being those assigned by TeX.
  74.  
  75.   3. However, several pages can have the same TeX page number in a .dvi
  76.      file.  For example, the introductory pages in a book are numbered
  77.      i, ii, and so on until the first chapter begins and then, the
  78.      pages are numbered 1, 2, etc.  In this case, the pages numbered i
  79.      and 1 in the .dvi file have the same TeX page number. If you want
  80.      to select for example the second occurrence of the page numbered
  81.      1, you can specify a page number as (@2)1. Thus @1 is equivalent
  82.      to (@1)1. For example, if you specify -f (@2)1 -l(@2)10 you
  83.      select the pages between 1 and 10 of the first chapter, not the
  84.      introductory pages between i and x.
  85.  
  86.    There is another parameter that tells DviDvi how you want to change
  87. page layout and specifications. But this parameter is somewhat
  88. complicated and therefore explained in a special section. See Examples.
  89.  
  90. Examples (the -m-parameter)
  91. ***************************
  92.  
  93.    There is another parameter that tells dvidvi how you want to change
  94. page layout and specifications. This is the -m parameter.
  95.  
  96.    The number preceding the colon is the modulo value.  Everything will
  97. be done in chunks of pages this big.  If there is no colon, than the
  98. default value is assumed to be one.  The last chunk of pages is padded
  99. with as many blank pages as necessary.
  100.  
  101.    Following the colon is a comma-separated list of page numbers.
  102. These page numbers are with respect to the current chunk of pages, and
  103. must lie in the range zero to the modulo value less one.  If a negative
  104. sign precedes the number, then the page is taken from the mirror chunk;
  105. if there are m chunks, then the mirror chunk of chunk n is the chunk
  106. numbered m-n-1.  Put simply, it is the chunk numbered the same, only
  107. from the end.  This can be used to reverse pages.  If no number is
  108. given, the page number defaults to 1.
  109.  
  110.    Following each page number is an optional offset value in
  111. parenthesis, which consists of a pair of comma-separated dimensions.
  112. Each dimension is a decimal number with an optional unit of measure.
  113. The default unit of measure is inches, or the last unit of measure
  114. used.  All units are in true dimensions.  Allowable units of measure
  115. are the same that TeX allows:  inmmcmptpcdd and
  116. cc.
  117.  
  118.    Simple enough, eh?  Okay, let's do some simple things.
  119.  
  120. -m -
  121.      Reverses the order of the pages.  This time, both the modulo and
  122.      the page number are defaulted.
  123.  
  124. -m 2:0
  125.      Selects the first, third, fifth, etc. pages from the file.  Print
  126.      this one after printing the next, taking the paper out of the feed
  127.      tray and reinserting it into the paper feed.
  128.  
  129. -m 2:-1
  130.      Selects the second, fourth, etc. pages, and writes them in reverse
  131.      order.
  132.  
  133. -m 4:-1,2(4.25in,0in)
  134. -m 4:-3,0(4.25in,0in)
  135.      Useful for printing a little booklet, four pages to a sheet,
  136.      double-sided, for stapling in the middle.  Print the first one,
  137.      put the stack back into the printer upside down, and print the
  138.      second.  The `in' specifications are superfluous.
  139.  
  140. -m ,(1pt,1)
  141.      Scare your system administrator!  Actually, things are so blurry
  142.      with this option, you may want to send enemies letters printed
  143.      like this.  *Long* letters.
  144.  
  145. -m 4:0(5.5in,4.25),3(0,4.25)
  146. -m 4:1(0in,4.25),2(5.5,4.25)
  147.      Print a four-page card on one sheet.  Print the first, rotate the
  148.      paper 180 degrees and feed it again.  (PostScript people can do
  149.      funny tricks with PostScript so this isn't necessary.)
  150.  
  151. Installing and using DviDvi with DviPS
  152. **************************************
  153.  
  154.    Installation isn't very hard: Just copy the program to a place
  155. contained in your search-path.
  156.  
  157.    Note that you don't need the parameters -sm-sw and -sh with
  158. DviPS: The document-width and -height are simply ignored by Dvips and
  159. the magnification can be changed with the -x parameter.
  160.  
  161.    A little example might help, which prints a DVI file with two pages
  162. per sheet of paper:
  163.  
  164.        dvidvi -m 2:0,1(7.3,0.0) infile.dvi outfile.dvi
  165.  
  166.        dvips -x 694 outfile.dvi
  167.  
  168.    Note that the -x-parameter divides the magnification by magstep(2),
  169. because 694 equals to 1000 divided by 1.44 (magstep(2)).
  170.  
  171. Installing and using DviDvi with PasTeX
  172. ***************************************
  173.  
  174.    Things are a little bit more complicated using PasTeX. This is
  175. because PasTeX (ShowDVI and DVIprint, to be a little more precise) uses
  176. the informations about document-width and height contained in the DVI
  177. file to determine the size of RAM that is needed. Further it isn't
  178. possible to scale the magnification in a device-independent way. (For
  179. example you need to divide the number 180 by magstep(2) when printing
  180. on a Nec-P6 in draft-mode instead of the device-independent number 1000
  181. from the example above.)
  182.  
  183.    DviDvi satisfies our needs with the options -sm-sw and
  184. -sh here. The example above would look here as follows:
  185.  
  186.        dvidvi -m 2:0(0.0,-0.75),1(7.3,-0.75) -sm -2 -sw 4 infile.dvi
  187. outfile.dvi
  188.  
  189.        dviprint landscape on outfile.dvi
  190.  
  191.    Installing looks nearly the same as installing DviDvi for DviPS
  192. (Simply copy the program to whereever you want), except that the
  193. automatical font-generation needs to get a little bit enhanced. (We
  194. need to support magstep(-4) up to magstep(9) now instead of magstep(0)
  195. up to magstep(9).) This is done by removing replacing the original file
  196. MakeTeXFont.rexx with the file PasTeX/MakeTeXFont.rexx from the
  197. DviDvi-distribution.
  198.  
  199. Contacting Thomas Rockicki
  200. **************************
  201.  
  202.    I (Jochen Wiedmann for now) am very sorry, that i don't know Thomas
  203. Rockicki's address, especially because of his friendly invitation to
  204. make suggestions about the program. All i found was an old
  205. Internet-address in Georg Hessmann's dvips-distribution. I don't know
  206. if it's still valid, but here it is:
  207.  
  208.        rockicki@neon.stanford.edu
  209.  
  210.    You can contact me as well, if you have problems concerning the
  211. Amiga-port.  I don't know if i can help (all i know about DVI files was
  212. what i learned in the last three hours), but i'll try. Here's how you
  213. reach me:
  214.  
  215.      Jochen Wiedmann
  216.      Am Eisteich 9
  217.      72555 Metzingen (Germany)
  218.      
  219.      Phone: 07123 / 14881
  220.      Internet: wiedmann@mailserv.zdv.uni-tuebingen.de
  221.  
  222.